import Vue from 'vue'
import Router from 'vue-router'
import HelloWorld from '@/components/HelloWorld'

import login from '@/pages/login';
import Page from '@/pages/page';
import Chart from '@/pages/chart'; // 数据统计
import UserList from '@/pages/userlist'; // 用户列表
import OrderList from '@/pages/orderlist'; // 订单列表
import shopList from '@/pages/shopList'; // 商品列表
import addShop from '@/pages/addShop'; // 商品列表
import vueEdit from '@/pages/vueEdit'; // 商品列表


Vue.use(Router)

export default new Router({
    routes: [
        {
            path: '/',
            name: 'login',
            component: login
        },{
            path: '/Page',
            name: 'Page',
            component: Page,
            children: [
                {
                    path: '/',
                    name: 'Chart',
                    component: Chart,
                    meta: []
                },{
                    path: '/UserList',
                    name: 'UserList',
                    component: UserList,
                    meta: ['数据列表', '用户列表'],
                },{
                    path: '/OrderList',
                    name: 'OrderList',
                    component: OrderList,
                    meta: ['数据列表', '订单列表']
                },{
                    path: '/shopList',
                    name: 'shopList',
                    component: shopList,
                    meta: ['添加数据', '商品列表']
                },{
                    path: '/addShop',
                    name: 'addShop',
                    component: addShop,
                    meta: ['添加数据', '商品列表', '添加商品']
                },{
                    path: '/vueEdit',
                    name: 'vueEdit',
                    component: vueEdit,
                    meta: ['编辑', '文本编辑']
                }
            ]
        }
    ]
})
